<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%
	String name = new String(request.getParameter("smallclassnames").getBytes("ISO-8859-1"), "UTF-8");
%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<meta name="viewport" id="viewport"
	content="width=device-width,initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
<meta name="format-detection" content="telephone=no" />
<link href="./css/reset.css" rel="stylesheet" type="text/css">
<link href="./css/classify.css" rel="stylesheet" type="text/css">
</head>
<body>
	<div class="near-box">
		<div class="yx-index-top">
			 <div class="header">
	  	 <a href="javascript:history.back()" class="left"></a>
	  	 <a id="titleText"></a>
	  </div>
			<div class="index-top-box1"></div>
		</div>

<!-- 开始 -->
				<div class="shopdatails" style="overflow-y: auto;padding-bottom: 55px;width: 96%;margin: 53px auto 0;"></div>
<!-- 结束 -->
	</div>
	<!--底部-->
	      <div class="kaola-bottom" >
		<a href="./index.jsp" class="kaola-bottom-box1">
			<span class="kaola-bottom-img1"><img src="./images/home.png"></span>
			<span class="kaola-bottom-text1 text2">首页</span>
		</a>
		<a href="./classify.html" class="kaola-bottom-box1">
			<span class="kaola-bottom-img1"><img src="./images/call.png"></span>
			<span class="kaola-bottom-text1">留言</span>
		</a>
		<a href="./shoping-cart.jsp" class="kaola-bottom-box1">
			<span class="kaola-bottom-img1"><img src="./images/shop-cart1.png"></span>
			<span class="kaola-bottom-text1">购物车</span>
		</a>
		<a href="./personal-center.jsp" class="kaola-bottom-box1">
			<span class="kaola-bottom-img1"><img src="./images/people1.png"></span>
			<span class="kaola-bottom-text1">我的</span>
		</a>
	</div>
	<script type="text/javascript" src="js/jquery-1.8.3.min.js"></script>
	<script type="text/javascript">
	function switab(tab,con,tab_c_css,tab_n_css,no) {  
    $(tab).each(function(i){  
        if(i == no)  
        {  
            $(this).addClass(tab_c_css);  
        }else  
        {  
            $(this).removeClass(tab_c_css);  
            $(this).addClass(tab_n_css);  
        }  
    })  
    if (con)  
    {  
        $(con).each(function(i){  
            if(i == no)  
            {  
                $(this).show();  
            }else  
            {  
                $(this).hide();  
            }  
        })  
    }  
}  
$(document).ready(function(){
    $(".classify-text1").each(function(i){
        $(this).click(function(){
            switab('.classify-text1','.content2','pitch-on2','',i);        
        })
    })
});

$(".price").click(function () {
        $(this).children(".sort-img").hide();
        $(this).children(".sort-img2").show();
        $(this).children(".sort-img2").toggleClass("img3");
	});
$(".classifyrt-text1").click(function () {
        $(this).addClass("tcolor-yellow");
        $(this).siblings(".classifyrt-text1").removeClass("tcolor-yellow");
	});
$(".list-show").click(function () {
        $(this).parent(".classify-right-title").next(".classify-list").slideToggle();
	});

$(".shop-cart-add").click(function() {
                var multi = 0;
                var vall = $(this).prev().val();
                vall++;
                $(this).prev().val(vall);
                TotalPrice();
            });
            $(".shop-cart-subtract").click(function() {
                var multi = 0;
                var vall = $(this).next().val();
                vall--;
                if(vall <= 0) {
                    vall = 0;
                }
                $(this).next().val(vall);
                TotalPrice();
});

</script>
	<script type="text/javascript">
$(function(){
	$("#titleText").html("<%=name%>");
	var path="<%=request.getSession().getAttribute("path")%>";
	titleShow(path);
})
function titleShow(path){
	var id="<%=request.getParameter("cid")%>";
		$.post("../../../tszs/txr/titleShowall.do?cid="+id,function(data){
			var html="";
			for (var i = 0; i < data.data.length; i++) {
			      html+="<div class=\"left-model\"  style=\"overflow-y:auto;width: 48%;padding: 0 1%;float: left;margin-bottom: 32px;\">"+
					"<a href=\"javascript:findShopDatails('"+data.data[i].cId+"')\" style=\"margin-top: 10px;\" class=\"d-box2-btn\"> <span>"+	
					"<img style=\"width: 100%;height: auto;\" src='"+path+data.data[i].cPhtoto.split(",")[0]+"'></span>"+
						"<span>"+data.data[i].cName+"</span> <span style=\"color: red;\">"+data.data[i].cPrice+"￥</span>"+
					"</a>"+
				"</div>";
			}
			$(".shopdatails").html(html); 
			},"json")
	}
function findShopDatails(cid){
	window.location.href="goods-details.jsp?cid="+cid;
}
</script>
</body>
</html>